﻿$(document).ready(function () {

    // views/Games/StartNewGame
    var test = $('.hide');
    test.hide();
    $(".boxItem").on("change", function () {

        // to get the id of selected option
        var str = $('option:selected', this).attr('id');

        var classname = '.' + str;
        var element = $(classname);
        var inputhtml = element.html();

        $(".insertForm").html(inputhtml);

    });


    

    // about/faq
    $(document).ready(function () {
        dynamicFaq();
    });

    function dynamicFaq() { // do make the answers drop down when they are clicked one at a time.
        $('dd').hide(); //hides the answers when they have not been clicked.
        $('dt').bind('click', function () { //when clicked then the answerw will be shown.
            $(this).toggleClass('open').next().slideToggle();; //makes the answers slide down when the question is clicked.
        });
    }

});
 